package com.xinyue.game.server.gamehandler;

import com.xinyue.game.messages.LoginRequest;
import com.xinyue.game.messages.LoginResponse;
import com.xinyue.network.hamdlermapping.GameChannelContext;
import com.xinyue.network.hamdlermapping.GameHandlerComponent;
import com.xinyue.network.hamdlermapping.GameMapping;

/**
 * @author 王广帅
 * @date 2021年01月26日 8:28 下午
 */
@GameHandlerComponent
public class LoginHandler extends AbstractGameHandler {

    @GameMapping(LoginRequest.class)
    public void login(GameChannelContext ctx, LoginRequest request) {
        LoginResponse response = new LoginResponse();
        response.setPlayId(1000);
        ctx.sendGameMessage(response);
        logger.debug("{} 登陆请求", request.getUsername());
    }
}
